From: Andreas Sturmlechner Date: Mon, 16 Feb 2026 21:21:55 +0000 (+0100) Subject: [PATCH] CMake: Find Qt6::GuiPrivate when USE_DBUS is enabled X-Git-Tag: archive/raspbian/6.23.0-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com//%22stanciumarius94%40gmail.com/%22/%22http:/www.example.com/%22stanciumarius94%40gmail.com/%22?a=commitdiff_plain;h=12c4eeca7decb9bc533741b930197fe616ca296d;p=kf6-kguiaddons.git [PATCH] CMake: Find Qt6::GuiPrivate when USE_DBUS is enabled Otherwise, build depends on WITH_WAYLAND also being enabled or else fails without Qt6::GuiPrivate. Amends 344679d5aa2e1f0aa27f63be59dade3be2b7f651 See also: https://bugs.gentoo.org/970127 Signed-off-by: Andreas Sturmlechner Gbp-Pq: Name upstream_CMake-Find-Qt6-GuiPrivate-when-USE_DBUS-is-enabled.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ccf7b9b..42a9e9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,11 @@ endif() option(USE_DBUS "Build components using DBus (get color scheme information via XDG portals)" ${USE_DBUS_DEFAULT}) if(USE_DBUS) find_package(Qt6DBus ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) + if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0") + find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) + else() + find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Private) + endif() set(WITH_DBUS ON) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1deba45..cf8cf13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -79,7 +79,7 @@ if(WITH_DBUS) colors/kcolorschemewatcher_xdg.cpp util/ksysteminhibitor_dbus.cpp ) - target_link_libraries(KF6GuiAddons PRIVATE Qt6::DBus) + target_link_libraries(KF6GuiAddons PRIVATE Qt6::DBus Qt6::GuiPrivate) target_compile_definitions(KF6GuiAddons PRIVATE WITH_DBUS) endif()